package com.jash.labor.controller;

import com.jash.labor.entity.StationCheckIn;
import com.jash.labor.service.StationCheckInService;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;

@RestController
@RequestMapping(value = "/StationCheckIn",produces= MediaType.APPLICATION_JSON_UTF8_VALUE)
public class StationCheckInController {//入职控制器
    @Resource
    private StationCheckInService stationCheckInService;
    @RequestMapping(value = "/add")
    public Object add(
            @RequestBody StationCheckIn stationCheckIn
    ){
        return stationCheckInService.add(stationCheckIn);
    }
    @RequestMapping(value = "/edit")
    public Object edit(
            @RequestBody StationCheckIn stationCheckIn
    ){
        return stationCheckInService.edit(stationCheckIn);
    }
    @RequestMapping(value = "/queryListPage")
    public Object queryListPage(
            @RequestParam(value = "pageNo") Integer pageNo,
            @RequestParam(value = "pageSize",required = false,defaultValue = "10") Integer pageSize
    ){
        return stationCheckInService.queryListPage(pageNo,pageSize);
    }

}
